package model.game;

/**
 *
 * @author Dustin
 */
public class ComputerPlayer extends Player {

    public ComputerPlayer(String aName) {
        super(aName);
    }

    public void doTurn(Table t) {
        double choice = Math.random();
        if(choice < 1/4) {
            pass();
        } else if(choice < 3/4) {
            swapCard(t, (int) Math.random() * HAND_SIZE,
                    (Math.random() < 0.5 ? (int) Math.random() * HAND_SIZE : Table.AMOUNT_OF_TABLE_CARDS - 1));
        } else {
            swapCards(t);
        }
    }
}
